package com.kk.emp.controller;

import com.kk.emp.entity.Dept;
import com.kk.emp.service.DeptServices;
import com.kk.emp.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/*
 *@author KK on 2022.10.08 1:46
 */
@Controller
@RequestMapping
public class DeptCotroller {
    @Autowired
    private DeptServices deptServices;

    @RequestMapping("/dept/getAll")
    @ResponseBody
    public List<Dept> getDeptAll(){
        return deptServices.getAll();
    }
}
